<?php
/**
 * @file newsinfo.php
 * @author LinLin
 * @date 2017年1月17日 下午6:37:20
 * @brief 
 */

namespace haibao\cms\data;

use haibao\frame\data\query\Condition;
use \haibao\cms\model\filter\Article as ArticleFilter;

class NewsInfo extends \haibao\cms\data\BaseMysql {
    
    public function __construct() {
        parent::__construct ( '\haibao\cms\model\data\NewsInfo' );
    }
    
    
    public function getAllList($filter){
        return $this->getAll($filter);
    }
    
    public function getOneNewsById($id){
        return $this->getOneById($id);
    }
    
    public function saveNewsInfo($model){
        if($model->Id){
            $this->save($model);
        }else{
            $this->add($model);
        }
       
    }
}